import { Module, forwardRef } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';

import { SystemModule } from '../system/system.module';
import WipOrderReport from '@main/entities/service/admin/wip/wip-order-report.entity';
import { WipOrderReportController } from './orderReport/orderReport.controller';
import { WipOrderReportService } from './orderReport/orderReport.service';
import SysUser from '@main/entities/service/admin/sys/sys-user.entity';
import BaseShift from '@main/entities/service/admin/base/base-shift.entity';
import BaseMachine from '@main/entities/service/admin/base/base-machine.entity';
import SysDictionary from '@main/entities/service/admin/sys/sys-dictionary.entity';
import { BaseModule } from '../base/base.module';
import ProductionOrder from '@main/entities/service/admin/production/production-order.entity';
import WipShutdownList from '@main/entities/service/admin/wip/wip-shutdown-list.entity';
import { WipShutdownListController } from './shutdownList/shutdownList.controller';
import { WipShutdownListService } from './shutdownList/shutdownList.service';
import BaseShutdownReason from '@main/entities/service/admin/base/base-shutdown-reason.entity';
import BaseBad from '@main/entities/service/admin/base/base-bad.entity';
import { WipBadRegistrationController } from './badRegistration/badRegistration.controller';
import WipBadRegistrationList from '@main/entities/service/admin/wip/wip-bad-registration-list.entity';
import WipBadRegistration from '@main/entities/service/admin/wip/wip-bad-registration.entity';
import { WipBadRegistrationService } from './badRegistration/badRegistration.service';
import WipAlarmRecord from '@main/entities/service/admin/wip/wip-alarm-record.entity';
import { WipAlarmRecordController } from './alarmRecord/alarmRecord.controller';
import { WipAlarmRecordService } from './alarmRecord/alarmRecord.service';
import WipMachineMaintain from '@main/entities/service/admin/wip/wip-machine-maintain.entity';
import WipMachineMaintainList from '@main/entities/service/admin/wip/wip-machine-maintain-list.entity';
import { WipMachineMaintainController } from './machineMaintain/machineMaintain.controller';
import { WipMachineMaintainService } from './machineMaintain/machineMaintain.service';
import BaseShiftUser from '@main/entities/service/admin/base/base-shift-user.entity';
import BaseWorkType from '@main/entities/service/admin/base/base-work-type.entity';

@Module({
  imports: [
    SystemModule,
    forwardRef(() => BaseModule),
    TypeOrmModule.forFeature([
      WipOrderReport,
      SysUser,
      BaseShift,
      BaseShiftUser,
      BaseWorkType,
      BaseMachine,
      SysDictionary,
      ProductionOrder,
      WipShutdownList,
      BaseShutdownReason,
      BaseBad,
      WipBadRegistration,
      WipBadRegistrationList,
      WipAlarmRecord,
      WipMachineMaintain,
      WipMachineMaintainList,
    ]),
  ],
  controllers: [
    WipOrderReportController,
    WipShutdownListController,
    WipBadRegistrationController,
    WipAlarmRecordController,
    WipMachineMaintainController,
  ],
  providers: [
    WipOrderReportService,
    WipShutdownListService,
    WipBadRegistrationService,
    WipAlarmRecordService,
    WipMachineMaintainService,
  ],
  exports: [TypeOrmModule, WipOrderReportService, WipMachineMaintainService],
})
export class WipModule {}
